package com.shengdai.urms.common.exception;

public class ServiceException extends Exception {
	private int errorcode = 400;

	private String message = "SERVICE错误";

	private Throwable rootCause = null;

	public int getErrorcode() {
		return errorcode;
	}

	public void setErrorcode(int errorcode) {
		this.errorcode = errorcode;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public ServiceException() {

	}

	public ServiceException(String message) {
		this.message = message;
	}

	public ServiceException(Throwable rootCause) {
		this.rootCause = rootCause;
		this.message = rootCause.getMessage();
	}

	public Throwable getRootCause() {
		return this.rootCause;
	}

	public void setRootCause(Throwable rootCause) {
		this.rootCause = rootCause;
	}

}
